﻿@{
    ViewBag.Title = "Báo cáo vấn đề Site";
    Layout = "~/Views/Shared/_Layout.Management.cshtml";
}

<h2 class="app">
	<strong>Báo cáo vấn đề Site</strong>
</h2>
<div class="toolbar topblue">
    <span class="area">
        <h3>Xem vấn đề Site</h3>
    </span>
    <a style="margin-right: 5px;" class="btn btn-exportexcel right" href='@Url.Action("ExportToExcel")'>Export to Excel</a>
</div>
<span class="paging">
    <span class="pageleft">
        <span class="total" data-bind='text: PageText'></span>
        <span class="show">Hiển thị <input type="text" class="text" data-bind="value: PageSize" onkeypress="return isNumberKey(event)" /> trên trang</span>
    </span>
    <span class="pages">Trang <input type="text" class="text" data-bind="value: CurrentPageIndex" onkeypress="return isNumberKey(event)" /> của <span data-bind="text: maxPageIndex"></span>
    <a href="##" class="btn btn-prev-arrow" data-bind="click: PrevButton, attr: {'class': PrevButtonClass}"></a>                            
    <a href="##" class="btn btn-next-arrow" data-bind="click: NextButton, attr: {'class': NextButtonClass}"></a>
    </span>
</span>
<table cellpadding="0" cellspacing="0" class="table tablegrid">
    <thead>        
	    <tr class="title">
		    <th>
                <span class="w">
                    <a href="#" data-bind='click: function(event) { SetOrder(event, "Name")}'>Tên liên hệ</a>
                    <div class="sort_wrapper" id="Name">  
                        <span class="grid_order ui_icon"></span>
                    </div>               
                </span>
            </th>
            <th>
                <span class="w">
                    <a href="#" data-bind='click: function(event) { SetOrder(event, "EmailAddress")}'>Email</a>
                    <div class="sort_wrapper" id="EmailAddress">  
                        <span class="grid_order ui_icon"></span>
                    </div>               
                </span>
            </th>

		    <th>
                <span class="w">
                    <a href="#" data-bind='click: function(event) { SetOrder(event, "Code")}'>Phone</a>
                    <div class="sort_wrapper" id="Phone">  
                        <span class="grid_order ui_icon"></span>
                    </div>               
                </span>
            </th>
            <th>
                <span class="w">
                    <a href="#" data-bind='click: function(event) { SetOrder(event, "ID")}'>#ID</a>
                    <div class="sort_wrapper" id="ID">  
                        <span class="grid_order ui_icon"></span>
                    </div>               
                </span>
            </th>
            <th>
                <span class="w">
                    <a href="#" data-bind='click: function(event) { SetOrder(event, "DateCreated")}'>Ngày tạo</a>
                    <div class="sort_wrapper" id="DateCreated">  
                        <span class="grid_order ui_icon"></span>
                    </div>               
                </span>
            </th>
            <th class="centeralign">
                <span class="w">
                    <a href="#" data-bind='click: function(event) { SetOrder(event, "Status")}'>Tình trạng</a>
                    <div class="sort_wrapper" id="Status">  
                        <span class="grid_order ui_icon"></span>
                    </div>               
                </span>
            </th>
	    </tr>
    </thead>
    <tbody data-bind="foreach: ItemsOnPage">
        <tr class="line">
		    <td><span class="w" style="font-weight:bold" data-bind='text: Fullname'></span></div>
		    <td><span class="w" data-bind='text: EmailAddress'></span></div>
            <td><span class="w" data-bind="text: Phone"></span></div>
            <td><span class="w" data-bind="text: ID"></span></div>
            <td><span class="w" data-bind="text: DateCreated"></span></div>
            <td class="centeralign">
                <span class="w" data-bind="text: Status, attr: {'class': Approved ? 'w': 'w green'}"></span>
            </div>
	    </tr>
    </tbody>
</table>

<script type="text/javascript">
    var data = @(Html.Raw(Json.Encode(Model)));
</script>
<script src="/Scripts/ViewModel/ProblemGrid.js" type="text/javascript"></script>